package designpattern.decorator;

import designpattern.car.Car;

/**
 * @author Jonny Long
 * @date 2021/5/20 8:37
 */
public class VolvoDecorator implements NewVolvo {
    private final Car car;

    public VolvoDecorator(Car car) {
        this.car = car;
    }

    @Override
    public void navigation() {
        System.out.println("添加功能---导航");
    }

    @Override
    public void voiceControl() {
        System.out.println("添加功能---语音控制");
    }

    @Override
    public void printCar() {
        car.printCar();
    }
}
